package com.dingli.admin.service.impl;

import com.dingli.admin.service.DeleteUser;
import com.dingli.framework.entity.User;
import com.dingli.framework.mapper.UserMapper;
import com.dingli.framework.util.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
    public class DeleteUserImpl implements DeleteUser {
    @Autowired
    private UserMapper userMapper;
    @Override
    public Response<User> deleteUser(int user_id) {
        int user = userMapper.deleteUser(user_id);
        if(user >= 1){
            return new Response(200, "删除成功");
        }else {
            return new Response(500, "删除失败");
        }
    }
}
